Add logger package documentation#7
Conversation
Documents the phpnomad/logger package, which provides a logging abstraction layer. Includes: - LoggerStrategy interface - CanLogException trait - Usage examples and integration guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 984eb55335
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Exception $e, | ||
| string $message = '', | ||
| array $context = [], | ||
| string $level = null | ||
| ): mixed; |
There was a problem hiding this comment.
Align logException return types with CanLogException
The docs define LoggerStrategy::logException() with a mixed return type, but the CanLogException trait documentation shows the method with no return type at all. In PHP, a class implementing LoggerStrategy and using that trait (as shown in the examples) would fail interface compatibility because the trait’s method signature doesn’t declare the required return type. If logException(): mixed is truly required, the trait and examples need to include that return type; otherwise the interface signature should omit it. This mismatch will cause a fatal error when users follow the documented approach.
Useful? React with 👍 / 👎.
Documents the phpnomad/logger package, which provides a logging abstraction layer.
Includes:
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]